$(function () {
    $("#close").on("click", function () {
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        parent.layer.close(index);
    })

    let wayNum = getQueryString("wayNum");
    let data={waynum:wayNum};
    let url = "logisticsReceipt/selectOne";
    $.get(url, data, function (rep) {
        if(rep.state==1){
            $("#shu").append(
                "<tr>" +
                "<td>" + rep.data.receiptWaynum + "</td>" +
                "<td>" + rep.data.receiptNumber + "</td>" +
                "<td>" + rep.data.receiptWeight + "</td>" +
                "<td>" + rep.data.receiptBilling + "</td>" +
                "<td>" + rep.data.wayFreight + "</td>" +
                "</tr>")
        }else {
            $("#tishi").append("<h3>该订单明细还未打印</h3>");
        }
    })

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }
})